package com.kexio.enterprise.integration.event.status;

import com.kexio.enterprise.integration.event.enums.EventStatus;

import java.time.LocalDateTime;

/**
 * 处理器状态
 * 
 * @author Kexio
 * @since 1.0.0
 */
public class HandlerStatus {
    private String handlerId;
    private String handlerName;
    private EventStatus status;
    private LocalDateTime startTime;
    private LocalDateTime endTime;
    private long processingTime;
    private String errorMessage;
    private int retryCount;

    public HandlerStatus() {
        this.startTime = LocalDateTime.now();
        this.retryCount = 0;
    }

    // Getters and Setters
    public String getHandlerId() { return handlerId; }
    public void setHandlerId(String handlerId) { this.handlerId = handlerId; }
    
    public String getHandlerName() { return handlerName; }
    public void setHandlerName(String handlerName) { this.handlerName = handlerName; }
    
    public EventStatus getStatus() { return status; }
    public void setStatus(EventStatus status) { this.status = status; }
    
    public LocalDateTime getStartTime() { return startTime; }
    public void setStartTime(LocalDateTime startTime) { this.startTime = startTime; }
    
    public LocalDateTime getEndTime() { return endTime; }
    public void setEndTime(LocalDateTime endTime) { this.endTime = endTime; }
    
    public long getProcessingTime() { return processingTime; }
    public void setProcessingTime(long processingTime) { this.processingTime = processingTime; }
    
    public String getErrorMessage() { return errorMessage; }
    public void setErrorMessage(String errorMessage) { this.errorMessage = errorMessage; }
    
    public int getRetryCount() { return retryCount; }
    public void setRetryCount(int retryCount) { this.retryCount = retryCount; }
}
